package com.tengfei.reflection;

/**
 * @Description:
 * @author: ten_fei
 * @date: 2021-07-15 11:57
 */
public class Test4 {
    static {
        System.out.println("main类被加载");
    }

    public static void main(String[] args) throws ClassNotFoundException {
//        Son son=new Son();
//        Class.forName("com.tengfei.reflection.Son");
//        System.out.println(Son.b);

//        Son[] array=new Son[5];

        System.out.println(Son.N);
    }
}

class Father {
    static int b = 2;

    static {
        System.out.println("父类被加载");
    }
}

class Son extends Father {
    static {
        System.out.println("子类被加载");
        m = 300;
    }

    static int m = 100;
    static final int N = 1;
}
